package com.woniuxy.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

@Data
public class UpdateShopParam {
    @NotNull(message = "门店不能为空")
    private Integer shopId;
    @NotBlank(message = "门店名不能为空")
    private String shopName;
    @NotBlank(message = "联系人不能为空")
    private String shopLinkman;
    @NotBlank
    /**
     * 验证手机号，空和正确的手机号都能验证通过<br/>
     * 正确的手机号由11位数字组成，第一位为1
     * 第二位为 3、4、5、7、8
     *
     */
    @Pattern(regexp = "1[3|4|5|7|8][0-9]\\d{8}", message = "手机号格式错误！")
    @NotBlank(message = "手机号不能为空！")
    @ApiModelProperty("手机号")
    private String shopPhone;
    @NotBlank(message = "地址不能为空")
    private String shopAddress;
    @NotNull(message = "状态不能为空")
    private Integer shopStatus;
    @NotEmpty(message = "请选择仓库")
    private List<Integer> warehouseIds;
}
